select DISTINCT ctp_affair."ID",ctp_affair.SUBJECT,ctp_affair.MEMBER_ID,FORMMAIN_0033.FIELD0065 as members,col_summary.FORM_RECORDID as fId,
formson_0034.FIELD0012,formson_0034.FIELD0036
from ctp_affair 
left outer join col_summary on ctp_affair.OBJECT_ID=col_summary.ID AND ctp_affair.MEMBER_ID = COL_SUMMARY.CURRENT_NODES_INFO
left outer join  FORMMAIN_0033 on col_summary.FORM_RECORDID=FORMMAIN_0033.id
LEFT JOIN formson_0034 ON FORMMAIN_0033.id = formson_0034.FORMMAIN_ID  
WHERE  COL_SUMMARY.TEMPLETE_ID = '7524894618998688498' AND CTP_AFFAIR.STATE = 3 AND FORMMAIN_0033.FIELD0132 = 0
AND col_summary.STATE = 0  AND (
 "TO_CHAR"(formson_0034.FIELD0012,'yyyy-MM') = "TO_CHAR"(add_months(trunc(sysdate),-1),'yyyy-MM') OR 
 "TO_CHAR"(formson_0034.FIELD0036,'yyyy-MM') = "TO_CHAR"(add_months(trunc(sysdate),-1),'yyyy-MM')
)